home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 66 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.5 KB

  1. From: David Byrden <100101.2547@compuserve.com>
  2. Message-ID: <4dkmtt$dap@news.bridge.net>
  3. X-Original-Date: 18 Jan 1996 05:47:41 GMT
  4. Path: in1.uu.net!bounce-back
  5. Date: 18 Jan 96 09:29:44 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Newsgroups: comp.std.c++
  8. Subject: Re: An STL helper -- and template and type shenanigans
  9. Organization: self-employed
  10. References: <30FCDA77.69CB@trilogy.com>
  11. X-Mailer: Mozilla 1.1N (Windows; I; 16bit)
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMP4TK+EDnX0m9pzZAQEv+gF/WyU/x7oS9uCSNlYsBMTcWyK05Q/uqReZ
  14.     Oxs7TuzZ0IXPTYRyfA0HFZ4HTGG4OKU/
  15.     =hytG
  16.  
  17. Allan;.
  18.  
  19. Can't see a way around your problem. Seem to remember the HP STL doing 
  20. similar things. Why worry, anyway? An optimising compiler will reduce the 
  21. cost of the bogus parameter to near zero.
  22.  
  23.  
  24. >>  to = from;
  25.  
  26. What happens to the original T objects that 'to' was tracking?
  27.  
  28.  
  29. >>  void deep_copy( Iter fromB, Iter fromE, Iter toB, Iter toE, 
  30. >>    ContainedType* )
  31.  
  32. The fourth parameter is redundant; the size of the range to be copied is 
  33. already specified by the first 2 parameters.
  34.  
  35.  
  36.  
  37. >> while( (fromB != fromE) && (toB != toE) && *fromB )
  38.  
  39. Not sure about this. It assumes that 'from' can contain some NULL 
  40. pointers, but that they are guaranteed to be together in a block at the 
  41. upper end of it.
  42.  
  43.  
  44.  
  45.    David Byrden
  46. ---
  47. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  48.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  49.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  50.